load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cdcevent",
    srcs = [
        "doc.go",
        "event.go",
        "projection.go",
        "rowfetcher_cache.go",
        "version_cache.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl/cdcevent",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/build",
        "//pkg/ccl/changefeedccl/changefeedbase",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/roachpb",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/colinfo",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/descs",
        "//pkg/sql/catalog/fetchpb",
        "//pkg/sql/catalog/lease",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/sql/row",
        "//pkg/sql/rowenc",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sessiondatapb",
        "//pkg/sql/types",
        "//pkg/util",
        "//pkg/util/cache",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/iterutil",
        "//pkg/util/json",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
    ],
)

go_test(
    name = "cdcevent_test",
    srcs = [
        "event_test.go",
        "main_test.go",
        "projection_test.go",
        "rowfetcher_test.go",
    ],
    embed = [":cdcevent"],
    deps = [
        "//pkg/base",
        "//pkg/ccl/changefeedccl/cdctest",
        "//pkg/ccl/changefeedccl/changefeedbase",
        "//pkg/jobs/jobspb",
        "//pkg/kv/kvserver",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/colinfo",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/lease",
        "//pkg/sql/distsql",
        "//pkg/sql/rowenc",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/skip",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
